<script>
function setNumRows(numContentBlocks) {
	var remainder = numContentBlocks % 3;
	
	if (remainder == 1) {
		var numRows = ((numContentBlocks - 1) / 3) + 1;
		return numRows;
	} else if (remainder == 2) {
		var numRows = ((numContentBlocks - 2) / 3) + 1;
		return numRows;
	} else if (remainder == 0) {
		var numRows = numContentBlocks / 3;
		return numRows;
	}
}
</script>